package com.example.yupao.controller;

import com.example.yupao.common.Result;
import com.example.yupao.model.response.TagSearchResponse;
import com.example.yupao.service.TagService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author hhf
 * @Date 2024/9/11
 * @Description
 */
@RestController
@RequestMapping("/tag")
public class TagController {

    @Resource
    private TagService tagService;

    @GetMapping("/search")
    public Result searchTags(){
        List<TagSearchResponse> response = tagService.search();
        return Result.success(response);
    }
}
